.post
  .post_left
    .post_details_left
      .date
        =_ '(date)', @media.creation
        .misc
          = if session[:user]!=nil 
            = button_to("Edit", :action=>"edit",:id=>@media.id) 
          = _("User")+":" 
          = @media.user.login
          %br/
          = _("Category")+":"
          = link_to @media.category.name,url_for(:controller=>"media",:action=>"category",:id=>@media.category.name)
          %br/
          = _("Tags")+":"
          = @media.tags.collect{|t| link_to(t.name,url_for(:controller=>"media",:action=>"tag",:id=>t.name))}.join(" ") unless @media.tags.count==0
  .post_right
    %p.post_title
      = link_to image_tag(@media.category.image,:border =>0,:align=>"top"),url_for(:controller=>"media",:action=>"category",:id=>@media.category.name)
      = link_to HTMLEntities.decode_entities(@media.title), url_for(:controller=>@media.permalink)
    .post_text
      = find_and_preserve(RedCloth.new(HTMLEntities.decode_entities(@media.text)).to_html)
      %p.post_details
        = link_to _("comments"), url_for(:controller=>@media.permalink+"/#comments") 
        = ":"
        = @media.comments.find(:all,:conditions=>"published=1 and banned=0").size 
        = link_to _("Add comment"),:controller=>"comment",:action=>"new",:id=>@media.id 
